Conventionally, in a game involving movement in a virtual world, there is a technique to set a protective state for protecting a character from a danger in a game, and move the character in the protective state according to the movement of the other characters.
However if the moving direction of the character in the protective state is determined according to the movement of the other characters, such as a leading character, the character in the protective state may remain for a long time in a position which is not appropriate for cancelling the protective state in the virtual world of the game, and a state where the game cannot be played may continue for a long time even if the protective state is cancelled, or a state where the protective state cannot be cancelled may continue for a long time.
An aspect of the present disclosure is a game program for causing a computer of a game machine to execute: performing game processing including movement of one or a plurality of characters in a virtual world; setting a protective state for protecting at least one character from a danger in a game when predetermined conditions are satisfied; setting a moving direction of the character in the protective state to a predetermined direction; detecting that the character in the protective state is overlapping with an object which obstructs the movement in the virtual world; and correcting the moving direction which has been set by the moving direction setting when the detecting detects the obstacle state.
The present disclosure can be understood as a game machine, a game system, a game processing method executed by a computer, or as a game program for a computer to execute. The present disclosure can also be understood as a program stored in a recording medium that a computer, a device, a machine or the like can read. Here the recording medium that a computer or the like can read refers to a recording medium which stores such information as data and programs electrically, magnetically, optically, mechanically or by chemical action, and which is read by a computer or the like.